package com.sumainfor.pc.gmio.controller.epc;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.gmio.service.EpcProviderService;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author Eddy·Chen
 * @Email 835033913@qq.com
 * @Create 2019-04-09 19:26
 */
@RestController
@RequestMapping("/provider/key/epc")
public class EpcProviderController {

    @Autowired
    private EpcProviderService service;

    /**
     * 添加打款订单
     *
     * @param params
     * @return
     */
    @PostMapping("/insertOutOrder")
    public JsonResult insertOutOrder(@RequestBody Map<String, Object> params) {
        if (MapUtils.isEmpty(params)) {
            return JsonResult.errorForEmpty();
        }
        return service.insertOutOrder(params);
    }

}
